#ifndef _I2C_H
#define _I2C_H
typedef enum
{
	I2C_OK = 0,
	I2C_START_FAIL,
	I2C_NO_ACK
}i2c_exit_code_e;

void i2c_init(void);
i2c_exit_code_e i2c_start(void);
void i2c_stop(void);
void i2c_ack(void);
void i2c_nack(void);
void i2c_send_byte(unsigned char value);
unsigned char  i2c_receive_byte(void);
i2c_exit_code_e i2c_wait_ack(void);
i2c_exit_code_e i2c_write_multi_bytes(unsigned char  dev_addr, unsigned char  reg_addr, const unsigned char  *buf, unsigned short size);
i2c_exit_code_e i2c_read_multi_bytes(unsigned char dev_addr, unsigned char  reg_addr, unsigned char *buf, unsigned short size);
i2c_exit_code_e i2c_dev_detect(unsigned char dev_addr);
#endif

